package com.cskaoyan.day1;

import java.util.Scanner;

public class Salary {
    public static void main(String[] args) {
        double pretax = 0;
        double tax = 0;
        Scanner scanner = new Scanner(System.in);
        pretax = scanner.nextDouble();
        if(pretax<500){
            tax=pretax*0.05;
        }else if(pretax<2000){
            tax=pretax*0.10-25;
        }else if(pretax<5000){
            tax=pretax*0.15-125;
        }else if(pretax<20000){
            tax=pretax*0.20-375;
        }else if(pretax<40000){
            tax=pretax*0.25-1375;
        }else if(pretax<60000){
            tax=pretax*0.30-3375;
        }else if(pretax<80000){
            tax=pretax*0.35-6375;
        }else if(pretax<100000){
            tax=pretax*0.40-10375;
        }else {
            tax=pretax*0.450-15375;
        }
        System.out.println("税前:"+pretax+" ,   需要收税："+tax+",到手工资为:"+(pretax-tax));
    }
}
